package global;

public class Utilities {

    public static int[] vertexBeforer(int[] a, int[] b) {
        if (a[0] < b[0]) return a;
        if (b[0] < a[0]) return b;
        if (a[1] < b[1]) return a;
        else return b;
    }

    public static int[] vertexAfterer(int[] a, int[] b) {
        if (a[0] > b[0]) return a;
        if (b[0] > a[0]) return b;
        if (a[1] > b[1]) return a;
        else return b;
    }

    public static boolean isBeforer(int[] a, int[] b) {
        if (b[0] < a[0])
            return true;
        if (b[0] > a[0])
            return false;
        return b[1] < a[1];
    }

    public static boolean isAfterer(int[] a, int[] b) {
        if (b[0] > a[0])
            return true;
        if (b[0] < a[0])
            return false;
        return b[1] > a[1];
    }

}
